<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <script src="/dist/priv/options.mjs" type="module"></script>
    <title>OdooTerminal Options</title>
  </head>

  <body>
    <form id="form_options">
      <div class="optsection">
        <h4 id="title_behaviour">Behaviour</h4>
        <p></p>
        <input type="checkbox" id="pinned" name="pinned" />
        <label for="pinned">Pinned</label><br />
        <input type="checkbox" id="maximized" name="maximized" />
        <label for="maximized">Maximized</label><br />
        <label for="opacity">Opacity:</label>
        <input
          type="range"
          id="opacity"
          name="opacity"
          min="0"
          max="100"
        /><br />
      </div>

      <div class="optsection">
        <h4 id="title_shortcuts">Shortcuts</h4>
        <p></p>
        <table id="shorcut_table">
          <thead>
            <tr>
              <th style="width: 13%" id="column_shortcuts_keybin">Keybind</th>
              <th style="width: 80%" id="column_shortcuts_command">Command</th>
              <th></th>
            </tr>
          </thead>
          <tbody></tbody>
        </table>
        <div class="shortcut_btn_zone">
          <input
            type="edit"
            id="shortcut_keybind"
            readonly="1"
            name="shortcut_keybind"
            placeholder="Keybind"
          />
          <input
            type="edit"
            id="shortcut_commands"
            name="shortcut_commands"
            placeholder="Command"
          />
          <button id="add_shortcut">Add</button>
        </div>
      </div>

      <div class="optsection">
        <h4 id="title_command_assistant">Command Assistant</h4>
        <p></p>
        <input
          type="checkbox"
          id="cmd_assistant_dyn_options_disabled"
          name="cmd_assistant_dyn_options_disabled"
        />
        <label for="cmd_assistant_dyn_options_disabled"
          >Disable dynamic options</label
        ><br />
        <label for="cmd_assistant_match_mode">Match mode:</label>
        <select id="cmd_assistant_match_mode" name="cmd_assistant_match_mode">
          <option value="startsWith">startsWith</option>
          <option value="includes">includes</option>
        </select>
        <br />
        <label for="cmd_assistant_max_results">Max. results:</label>
        <input
          type="number"
          id="cmd_assistant_max_results"
          name="cmd_assistant_max_results"
          min="1"
          max="50"
        />
        <br />
      </div>

      <div class="optsection">
        <h4 id="title_init_commands">Init Commands</h4>
        <p id="desc_init_commands">
          Run these commands when initialize the terminal (one per line). Be
          careful! changes here can cause unwanted exceptions. Note that the
          commands will be executed on all 'odoo' pages.
        </p>
        <textarea id="init_cmds"></textarea>
      </div>

      <div class="optsection">
        <h4 id="title_terminal_context">Terminal Context</h4>
        <p id="desc_terminal_context">
          This context will be merged with the "normal" context on terminal
          operations. In json format.
        </p>
        <textarea id="term_context"></textarea>
      </div>

      <div class="optsection">
        <h4 id="title_developer_zone">Extension Developer Zone</h4>
        <p></p>
        <input type="checkbox" id="devmode_tests" name="devmode_tests" />
        <label for="devmode_tests">Use OdooTerminalTests</label><br />
        <input
          type="checkbox"
          id="devmode_ignore_comp_checks"
          name="devmode_ignore_comp_checks"
        />
        <label for="devmode_ignore_comp_checks"
          >Disable Odoo version checking (this can cause unwanted
          exceptions!)</label
        ><br />
        <input
          type="checkbox"
          id="devmode_console_errors"
          name="devmode_console_errors"
        />
        <label for="devmode_console_errors"
          >Show errors in the browser console</label
        ><br />
      </div>

      <div class="btn_zone">
        <button type="button" id="reset_settings">Reset</button>
        <button type="submit" id="save_settings">Save</button>
      </div>
    </form>
  </body>
</html>
